/*
    KMC Simulation
    Copyright (c) 2012-14 Filip Rozbořil

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#include "includes.h"

namespace Site
{
	typedef uint32_t type;
	
	const type Free = 0;
	const type Kink = 1;
	const type Single = 2;
	const type DoubleKink = 3;
	const type Lateral = 4;
	const type Dimer = 5;
	const type DimerKink = 6;
	const type DimerSingle = 7;
	const type DimerDoubleKink = 8;
	
	const type Count = 9;
	
	const char* getName(type site);
}

namespace Direction
{
	typedef uint32_t type;
	
	const type Down = 0;
	const type Up = 1;
	const type Left = 2;
	const type Right = 3;
	
	const type Count = 4;
	
	const char* getName(type dir);
	
	inline constexpr bool isVertical(type dir)
	{
		return dir < Left;
	}
	
	inline constexpr int32_t projectx(type dir)
	{
		return isVertical(dir) ? 0 : (2 * dir - 5);
	}
	
	inline constexpr int32_t projecty(type dir)
	{
		return isVertical(dir) ? (2 * dir - 1) : 0;
	}
}

namespace Object
{
	typedef uint32_t type;
	
	const type None = 0;
	const type AlAtom = 1;
	const type SnAtom = 2;
	const type DefectC = 3;
	
}
